<div class="page-content">
    <div class="page-header">
        <h1>
            风险管理
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                	&nbsp;风险报表
            </small>
        </h1>
    </div><!-- /.page-header -->
	<form class="form-horizontal" role="form">
    	<h3 class="header smaller lighter blue">
			<select multiple="" name="id" id="example-id" class="chosen-select" id="form-field-select-3" data-placeholder="风险点" style="width: 80%;">
				<option value=""> </option>
				<#list fxfkjzs as lst>
					<option value="${lst.id!}" <#if example.id! == lst.id || example.id!?index_of(lst.id+",") != -1>selected</#if> >${lst.id!}</option>
				</#list>
			</select>
		</h3>
    	<h3 class="header smaller lighter blue">
			<select multiple name="hcsj" id="example-hcsj" class="chosen-select" id="form-field-select-3" data-placeholder="核查月份" style="width:500px;">
				<option value=""> </option>
				<#list dates as lst>
					<option value="${lst!}" <#if example.hcsj! == lst || example.hcsj!?index_of(lst+",") != -1>selected</#if> >${lst!}</option>
				</#list>
			</select>
			
			
			<select name="fxdj" id="example-fxdj" class="chosen-select" id="form-field-select-3" data-placeholder="风险等级" style="width: 100px;">
				<option value=""> </option>
				<option value="">全部</option>
				<#list fengxiandengji?keys as key>
					<option value="${key}" <#if example.fxdj! == key>selected</#if> >${fengxiandengji[key]}</option>
				</#list>
			</select>
			
			<button type="button" id="button-analysis" class="btn btn-sm btn-success">
				搜索
				<i class="ace-icon fa fa-hand-o-down icon-on-right bigger-110"></i>
			</button>&nbsp;
			<a href="#" id="download-button" class="btn btn-white btn-info btn-bold">
				<i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>
				下载
			</a>
		</h3>
    </form>
    <div class="row">
        <div class="col-xs-12">
            <div class="scrollspy-example">
                <div class="clearfix">
                    <div class="pull-right tableTools-container"></div>
                </div>
                <table id="dynamic-table" class="table table-striped table-bordered table-hover disabled">
                    <thead>
                    <tr>
                        <th>风险点序</th>
                        <th>一类</th>
                        <th>二类</th>
                        <th>部门接口</th>
                        <th>风险点部</th>
                        <th style="white-space: nowrap">风险点名</th>
                        <th style="white-space: nowrap">风险监控</th>
                        <th style="white-space: nowrap">风险等级</th>
                        <th style="white-space: nowrap">抽检监控</th>
                        <th style="white-space: nowrap">单位名称</th>
                        <th style="white-space: nowrap">核查时间</th>
                        <th style="white-space: nowrap">发现问题</th>
                        <th style="white-space: nowrap">各单位负责人</th>
                        <th style="white-space: nowrap">各单位主管领导</th>
                        <th style="white-space: nowrap">反馈时间</th>
                        <th style="white-space: nowrap">是否提供回执单</th>
                        <th style="white-space: nowrap">整改措施</th>
                        <th style="white-space: nowrap">核查结果</th>
                        <th style="white-space: nowrap">预计整改完成时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    <#if datas??>
                    <#list datas as lst>
                    <tr>
                		<#if lst.ROWS??>
                		<td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.ID!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.CLASS1}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.CLASS2!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.BMJKR!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.FXDBMFZR!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.FXDMC!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.FXJKKJ!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.FXDJ!}</td>
                        <td rowspan="${lst.ROWS}" style="vertical-align:middle;">${lst.CJJKPV!}</td>
                		</#if>
                        <td>${lst.DEPTNAME!}</td>
                        <td>${lst.HCSJ!}</td>
                        <td>${lst.FXWT!}</td>
                        <td>${lst.GDWFZR!}</td>
                        <td>${lst.GDWZGLD!}</td>
                        <td>${lst.FKSJ!}</td>
                        <td>
                        	<#if lst.SFTGHZD! == "1">是</#if>
                        	<#if lst.SFTGHZD! == "0">否</#if>
                        	<#if lst.enclosures??>
                        		（附件：
                        		<#list lst.enclosures as en>
                        			<a href="#" id="${en.ID!}" class="huizhi-file-download">${en.FILENAME!}</a>&nbsp;
                        		</#list>
                        		）
                        	</#if>
                        </td>
                        <td>${lst.QTBZ!}</td>
                        <td>${lst.GDWFKJG!}</td>
                        <td>
                        	<#if (lst.YJZGWCSJ)??>${lst.YJZGWCSJ?substring(0,10)}</#if>
                        </td>
                    </tr>
                    </#list>
                    </#if>
                    </tbody>
                </table>
            </div>
        </div><!-- /.col -->
    </div><!-- /.row -->
</div>

<script>
$(".huizhi-file-download").click(function(){
	var $this = $(this);
	$this.attr('href',$.router.fujiandownload+"?id="+$this.attr('id'));
});
$("#download-button").click(function(){
	var formSearch = $(".form-horizontal");
	var $this = $(this);
	$this.attr('href',$.router.anaydownload+"?"+formSearch.serialize());
});
$("#button-analysis").click(function(){
	var formSearch = $(".form-horizontal");
	formSearch.attr('action',$.router.analysis);
	$.loadPage(formSearch.attr('action')+"?t="+new Date().getTime(),{
		type:"post",
		data:formSearch.serializeArray(),
		callback:function(el){
			
		},
		el:"#page-content"
	});
})
$('.chosen-select').chosen({allow_single_deselect:true}); 
</script>